package lab03.test01;

import com.sun.org.apache.regexp.internal.RE;

import java.io.*;

/**
 * Created by dell on 2017/11/16.
 */
public class Read {
    public static void main(String[] args) {
        //字符流，读文件
        String path="D:\\hello.txt";
        BufferedReader reader=null;
            try {
                reader = new BufferedReader(new FileReader(path));
                String line=null;
               while(( line=reader.readLine())!=null){
                System.out.println(line);
               }
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }finally{
                try {
                    reader.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
    }
    }


